﻿
using CSharpPro._1106;

namespace CSharpPro;
    
class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine("=== 用户管理系统 - 第九周作业 ===");
        
        // 创建用户服务实例
        IUserService userService = new UserServiceImpl();
        
        // 添加一些测试数据
        InitializeTestData(userService);
        
        // 启动主菜单
        userService.ShowMainMenu();
    }
    
    static void InitializeTestData(IUserService userService)
    {
        try
        {
            // 添加测试用户
            userService.Register(new User("admin", "Admin123", "admin@example.com"), "Admin123");
            userService.Register(new User("user1", "User1123", "user1@example.com"), "User1123");
            userService.Register(new User("testuser", "Test123", "test@example.com"), "Test123");
            
            Console.WriteLine("测试数据初始化完成！");
        }
        catch (Exception ex)
        {
            Console.WriteLine($"测试数据初始化失败: {ex.Message}");
        }
    }
}
    
   